using System.Runtime.InteropServices;
using xrwang.DDNS;

IHostBuilder hostBuilder = Host.CreateDefaultBuilder(args);
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
    hostBuilder.UseWindowsService();
else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
    hostBuilder.UseSystemd();
IHost host = hostBuilder
.ConfigureServices(services =>
{
    services.AddHostedService<Worker>();
})
.Build();

await host.RunAsync();
